package com.xlblog.blog.controller;

import com.baomidou.mybatisplus.extension.service.IService;
import com.xlblog.blog.entity.User;
import com.xlblog.blog.service.UserService;
import com.xlblog.blog.utils.RespBean;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


/**
 * 评论管理员登录
 * */
@CrossOrigin
@RestController
@RequestMapping("/comment")
public class UserController{

    @Autowired
    UserService userService;

    //管理员登陆
    @GetMapping("/login")
    @ApiOperation("管理员登录")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "username",value = "账号") ,
            @ApiImplicitParam(name = "password",value = "密码"),
    })
    public boolean vuefindByPage(String username,String password){
        return userService.login(username,password);
    }

}
